StartSimulationEngine  "SimState/basicsim.xml"

FlushScript  

call proc1

Procedure  proc1
	
	AddNewEntity    ent1  	/Position:0  0.205  0
	
	AddSphereShape  
		/Radius:0.2  	/Mass:0.1

	FlushScript  
		
	angle = Util.ToRadians(270)	
	x = Math.Cos(angle) * 0.205
	y = Math.Sin(angle) * 0.205 + 0.21
	
	AddNewEntity    box1  	/Position:{x}  {y}  0	/IsKinematic:true
	AddBoxShape  	/Dimensions:0.1  0.01  0.4  	/Mass:0.1	
	
	FlushScript  	

	angle = Util.ToRadians(225)
	x = Math.Cos(angle) * 0.205
	y = Math.Sin(angle) * 0.205 + 0.21

	AddNewEntity    box2  	/Position:{x}  {y}  0	/IsKinematic:true	
		/Orientation:0    0    {225-90}
	AddBoxShape  	/Dimensions:0.1  0.01  0.4  	/Mass:0.1

	FlushScript  
		
	angle = Util.ToRadians(180)
	x = Math.Cos(angle) * 0.205
	y = Math.Sin(angle) * 0.205 + 0.21

	AddNewEntity    box3  	/Position:{x}  {y}  0	/IsKinematic:true	
		/Orientation:0    0    {180-90}
	AddBoxShape  	/Dimensions:0.1  0.01  0.4  	/Mass:0.1

	FlushScript  
		
	angle = Util.ToRadians(135)
	x = Math.Cos(angle) * 0.205
	y = Math.Sin(angle) * 0.205 + 0.21

	AddNewEntity    box4  	/Position:{x}  {y}  0	/IsKinematic:true	
		/Orientation:0    0    {135-90}
	AddBoxShape  	/Dimensions:0.1  0.01  0.4  	/Mass:0.1

	FlushScript  
	
	angle = Util.ToRadians(90)
	x = Math.Cos(angle) * 0.205
	y = Math.Sin(angle) * 0.205 + 0.21

	AddNewEntity    box5  	/Position:{x}  {y}  0	/IsKinematic:true	
		/Orientation:0    0    {90-90}
	AddBoxShape  	/Dimensions:0.1  0.01  0.4  	/Mass:0.1

	FlushScript  

End
